1.2.3.1. alpha.cplusplus.DeleteWithNonVirtualDtor (C++)
Reports destructions of polymorphic objects with a non-virtual destructor in their base class.
Examples:
NonVirtual *create() { NonVirtual *x = new NVDerived(); // note: conversion from derived to base // happened here return x; } void sink(NonVirtual *x) { delete x; // warn: destruction of a polymorphic object with no virtual // destructor }